package oop.java0324.multidiver;

/**
 * 坦克有马力数、携带弹头数等属性，有启动、爬坡等方法
 */
public class Tank {
    int horsepower;//马力
    int fireNumber;

    public Tank(int horsepower, int fireNumber) {
        this.horsepower = horsepower;
        this.fireNumber = fireNumber;
    }

    public void start() {
        System.out.println("坦克启动");
    }

    public void climb() {
        System.out.println("开足马力，爬坡");
    }

    public void showInfo() {
        System.out.println("这款虎式坦克有" + horsepower + "马力，可携带" + fireNumber + "发炮弹");
    }
}
